package com.maidou.qiantai.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.maidou.qiantai.mapper.OsOrderSettingMapper;
import com.maidou.qiantai.domain.OsOrderSetting;
import com.maidou.qiantai.service.IOsOrderSettingService;

/**
 * 订单配置信息Service业务层处理
 * 
 * @author maidou
 * @date 2024-03-15
 */
@Service
public class OsOrderSettingServiceImpl implements IOsOrderSettingService 
{
    @Autowired
    private OsOrderSettingMapper osOrderSettingMapper;

    /**
     * 查询订单配置信息
     * 
     * @param id 订单配置信息主键
     * @return 订单配置信息
     */
    @Override
    public OsOrderSetting selectOsOrderSettingById(Long id)
    {
        return osOrderSettingMapper.selectOsOrderSettingById(id);
    }

    /**
     * 查询订单配置信息列表
     * 
     * @param osOrderSetting 订单配置信息
     * @return 订单配置信息
     */
    @Override
    public List<OsOrderSetting> selectOsOrderSettingList(OsOrderSetting osOrderSetting)
    {
        return osOrderSettingMapper.selectOsOrderSettingList(osOrderSetting);
    }

    /**
     * 新增订单配置信息
     * 
     * @param osOrderSetting 订单配置信息
     * @return 结果
     */
    @Override
    public int insertOsOrderSetting(OsOrderSetting osOrderSetting)
    {
        osOrderSetting.setCreateTime(DateUtils.getNowDate());
        return osOrderSettingMapper.insertOsOrderSetting(osOrderSetting);
    }

    /**
     * 修改订单配置信息
     * 
     * @param osOrderSetting 订单配置信息
     * @return 结果
     */
    @Override
    public int updateOsOrderSetting(OsOrderSetting osOrderSetting)
    {
        osOrderSetting.setUpdateTime(DateUtils.getNowDate());
        return osOrderSettingMapper.updateOsOrderSetting(osOrderSetting);
    }

    /**
     * 批量删除订单配置信息
     * 
     * @param ids 需要删除的订单配置信息主键
     * @return 结果
     */
    @Override
    public int deleteOsOrderSettingByIds(Long[] ids)
    {
        return osOrderSettingMapper.deleteOsOrderSettingByIds(ids);
    }

    /**
     * 删除订单配置信息信息
     * 
     * @param id 订单配置信息主键
     * @return 结果
     */
    @Override
    public int deleteOsOrderSettingById(Long id)
    {
        return osOrderSettingMapper.deleteOsOrderSettingById(id);
    }
}
